﻿@model EFEntity.Emajor_change

@{
    ViewData["Title"] = "register";
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="../../css/table.css" type="text/css" />
    <script type="text/javascript" src="../../javascript/jquery-1.7.2.js"></script>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="../../css/table.css" type="text/css">
    <link rel="stylesheet" type="text/css" media="all"
          href="../../javascript/calendar/calendar-win2k-cold-1.css">
    <script type="text/javascript" src="../../javascript/calendar/cal.js"></script>
    <script type="text/javascript" src="../../javascript/comm/comm.js"></script>
    <script type="text/javascript" src="../../javascript/comm/list.js"></script>
    <script type="text/javascript" src="../../javascript/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="../../javascript/calendar-ch.js"></script>
    <script type="text/javascript" src="../../javascript/comm/time.js"></script>
    <link rel="stylesheet" href="../../css/cwcalendar.css" type="text/css" />
    <script src="~/jquery.js"></script>
    <script src="~/vue.js"></script>
</head>

<body>
    <div id="app">
        <form action="register" method="post">
            <table width="100%">
                <tr>
                    <td>
                        <font color="#0000CC">您正在做的业务是:人力资源--调动管理--调动登记</font>
                    </td>
                </tr>

                <tr>
                    <td align="right">
                        <input type="submit" value="提交" class="BUTTON_STYLE1"
                               onclick="mySubmit()">
                        <input type="button" class="BUTTON_STYLE1"
                               onclick="javascript:window.history.back();" value="返回">
                    </td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding=0 cellspacing=1
                   bordercolorlight=#848284 bordercolordark=#eeeeee
                   class="TABLE_STYLE1">
                <tr height="21">
                    <td hidden="hidden">
                        <input asp-for="mch_id" class="form-control" />
                        <span asp-validation-for="mch_id" class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        档案编号
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input asp-for="human_id" class="form-control" />
                        <span asp-validation-for="human_id" class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        姓名
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input asp-for="human_name" class="form-control" />
                        <span asp-validation-for="human_name" class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                </tr>
                <tr>

                    <td class="TD_STYLE1" width="8%">
                        原一级机构
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="first_kind_name " class="form-control" />
                        <span asp-validation-for="first_kind_name " class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        原二级机构
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input asp-for="second_kind_name " class="form-control" />
                        <span asp-validation-for="second_kind_name " class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="8%">
                        原三级机构
                    </td>
                    <td class="TD_STYLE2" width="10%">
                        <input asp-for="third_kind_name " class="form-control" />
                        <span asp-validation-for="third_kind_name " class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                </tr>

                <tr>
                    <td class="TD_STYLE1">
                        原职位分类
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="major_kind_name " class="form-control" />
                        <span asp-validation-for="major_kind_name " class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1" width="12%">
                        原职位名称
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="major_name  " class="form-control" />
                        <span asp-validation-for="major_name " class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1">
                        原薪酬标准
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="salary_standard_name" class="form-control" />
                        <span asp-validation-for="salary_standard_name" class="text-danger"></span>
                    </td>
                    <td class="TD_STYLE1">
                        原薪酬总额
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="salary_sum" class="form-control" />
                        <span asp-validation-for="salary_sum" class="text-danger"></span>
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        新一级机构名称
                    </td>
                    <td class="TD_STYLE2">
                        <select asp-for="new_first_kind_id" asp-items="ViewBag.s" class="form-control"></select>
                    </td>
                    <td class="TD_STYLE1" width="12%">
                        新二级机构名称
                    </td>
                    <td class="TD_STYLE2">
                        <select asp-for="new_second_kind_id" asp-items="ViewBag.s1" class="form-control" ></select>

                    </td>
                    <td class="TD_STYLE1" width="12%">
                        新三级机构名称
                    </td>
                    <td class="TD_STYLE2">
                        <select asp-for="new_third_kind_id" asp-items="ViewBag.s2" class="form-control" ></select>

                    </td>
                    <td class="TD_STYLE1" width="8%">
                    </td>
                    <td class="TD_STYLE2" width="10%">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        新职位分类
                    </td>
                    <td class="TD_STYLE2">
                        <select asp-for="new_major_kind_id" asp-items="ViewBag.s3" class="form-control"></select>
                    </td>
                    <td class="TD_STYLE1" width="12%">
                        新职位名称
                    </td>
                    <td class="TD_STYLE2">
                        <select asp-for="new_major_id" asp-items="ViewBag.s4" class="form-control"></select>

                    </td>
                    <td class="TD_STYLE1">
                        新薪酬标准
                    </td>
                    <td class="TD_STYLE2">
                        <select asp-for="new_salary_standard_id" asp-items="ViewBag.s4" class="form-control"></select>
                    </td>
                    <td class="TD_STYLE1">
                        新薪酬总额
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="new_salary_sum" class="form-control" id="new_salary_sum"/>
                        <span asp-validation-for="new_salary_sum" class="text-danger"></span>
                    </td>
                </tr>

                <tr>
                    <td class="TD_STYLE1">
                        登记人
                    </td>
                    <td class="TD_STYLE2">
                        <input asp-for="register " class="form-control" readonly="readonly"/>
                        <span asp-validation-for="register " class="text-danger" ></span>
                    </td>
                    <td class="TD_STYLE1">
                        登记时间
                    </td>
                    <td class="TD_STYLE2">
                        <input type="text" name="majorChange.registTime" readonly="readonly"
                               id="Tdate" class="INPUT_STYLE2">
                        <SCRIPT type="text/javascript">
                            function time() {
                                var tdate = document.getElementById("Tdate");
                                var d = new Date();
                                var y = d.getFullYear();
                                var moth = d.getMonth() + 1;
                                var date = d.getDate();
                                var h = d.getHours();
                                var m = d.getMinutes();
                                var s = d.getSeconds();
                                var hh = 20 - 1 - h;
                                var mm = 60 - 1 - m;
                                var ss = 60 - s;
                                if (hh > 0) {
                                    mm = mm + 60 * hh;
                                }
                                if (moth < 10) {
                                    moth = "0" + moth;
                                }
                                if (date < 10) {
                                    date = "0" + date;
                                }
                                if (h < 10) {
                                    h = "0" + h;
                                }
                                if (m < 10) {
                                    m = "0" + m;
                                }
                                if (s < 10) {
                                    s = "0" + s;
                                }
                                if (mm < 10) {
                                    mm = "0" + mm;
                                }
                                if (ss < 10) {
                                    ss = "0" + ss;
                                }

                                tdate.value = y + "-" + moth + "-" + date + "- " + h + ":" + m + ":" + s;


                            }
                            window.onload = time;
                            var out = window.setInterval(time, 1000);
                        </SCRIPT>
                    </td>
                    <td class="TD_STYLE1">
                    </td>
                    <td class="TD_STYLE2">
                    </td>
                    <td class="TD_STYLE1">
                    </td>
                    <td class="TD_STYLE2">
                    </td>
                </tr>
                <tr>
                    <td class="TD_STYLE1">
                        调动原因
                    </td>
                    <td colspan="7" class="TD_STYLE2">
                        <input asp-for="change_reason " class="form-control" />
                        <span asp-validation-for="change_reason " class="text-danger"></span>
                    </td>
                </tr>
            </table>
        </form>
    </div>
</body>

</html>
<script type="text/javascript">
    var vm = new Vue({
        el: "#app",
        data: {
        },
        methods: {
            one: function (o) {
                var t = this;
                $.ajax({
                    url: "/transfer/LianDong?one=" + o,
                    type: "get",
                    success: function (data) {
                        var d = eval("(" + data + ")");
                        $("#second_kind_id").empty().append("<option>--请选择--</option>");
                        for (var i = 0; i < d.length; i++) {
                            var option = document.createElement("option");
                            $(option).val(d[i].second_kind_id);
                            $(option).text(d[i].second_kind_name);
                            $('#second_kind_id').append(option);
                        }
                    }
                })

            },
            two: function (o) {
                var t = this;
                $.ajax({
                    url: "/transfer/LianDongtwo?two=" + o,
                    type: "get",
                    success: function (data) {
                        var d = eval("(" + data + ")");
                        $("#new_third_kind_id").empty().append("<option>--请选择--</option>");
                        for (var i = 0; i < d.length; i++) {
                            var option = document.createElement("option");
                            $(option).val(d[i].third_kind_id);
                            $(option).text(d[i].third_kind_name);
                            $('#new_third_kind_id').append(option);
                        }
                    }
                })
            },
            i: function (o) {
                var t = this;
                $.ajax({
                    url: "/transfer/zhiweifenlei?ii=" + o,
                    type: "get",
                    success: function (data) {
                        var d = eval("(" + data + ")");
                        $("#new_major_id").empty().append("<option>--请选择--</option>");
                        for (var i = 0; i < d.length; i++) {
                            var option = document.createElement("option");
                            $(option).val(d[i].major_id);
                            $(option).text(d[i].major_name);
                            $('#new_major_id').append(option);
                        }
                    }
                })
            }

        },
        mounted: function () {
            var t = this;
            $("#new_first_kind_id").change(function () {
                var o = $("#new_first_kind_id").val();
                t.one(o)
            });
            $("#new_second_kind_id").change(function () {
                var o = $("#new_second_kind_id").val();
                t.two(o)
            });
            $("#new_major_kind_id").change(function () {
                var o = $("#new_major_kind_id").val();
                t.i(o)
            });
            $("#new_salary_standard_id").change(function () {
                $("#new_salary_sum").val("11000.00");
            });

        }
    })
</script>


